home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * Event.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
- if (!IS.isModuleInitialized("IS.NOF.EventObject"))
- {
- /****h* NOF_JavaScript_Library/NOF.EventObject
- *
- * NAME
- * NOF.EventObject
- *
- * DESCRIPTION
- * encapsulates generic events in Fusion. Base class for all types of events.
- *
- ****/
-
- /**
- * Constructor
- * @param id
- * @param source
- **/
- function NOF_EventObject( id, source ){
- this.__proto__ = NOF_EventObject.prototype;
- this.id = id;
- this.source = source;
- }
- {
- var method = NOF_EventObject.prototype;
- method.getSource = function (){return this.source;};
- method.getID = function (){return this.id;};
- method.setID = function ( id ){this.id = id;};
-
- method.equals = function (_evt) {
- if (this.id == _evt.getID() && this.source == _evt.getSource())
- return true;
- return false;
- }
-
- method.toString = function (){
- var source = this.source;
- if (typeof(this.source) == 'object' && this.source != null)
- if (typeof(this.source.dump) == 'function'){
- source = this.source.dump();
- }else{
- source = this.source.toString();
- }
-
- return "id: " + this.id + "source: " + source;
- }
- }
-
- NOF.__proto__.EventObject = NOF_EventObject;
- NOF.addVariable( "EventObject.GENERIC_EVENT", "GENERIC_EVENT" );
-
- /****h* NOF_JavaScript_Library/NOF.MenuEvent
- *
- * NAME
- * NOF.MenuEvent
- *
- * DESCRIPTION
- * encapsulates events occured in a menu.
- *
- ****/
-
- /**
- * Constructor
- * @param type
- * @param source
- **/
- function NOF_MenuEvent( type, source ){
- this.__proto__ = NOF_MenuEvent.prototype;
-
- this.SUPER(type, source);
- }
- NOF_MenuEvent.inherits(NOF_EventObject);
- NOF.__proto__.MenuEvent = NOF_MenuEvent;
-
- NOF.addVariable("MenuEvent.ITEM_SELECTED", "ITEM_SELECTED");
- NOF.addVariable("MenuEvent.ITEM_DESELECTED", "ITEM_DESELECTED");
-
-
- /****h* NOF_JavaScript_Library/NOF.WindowEvent
- *
- * NAME
- * NOF.WindowEvent
- *
- * DESCRIPTION
- * encapsulates events occured in a window.
- *
- ****/
-
- /**
- * Constructor
- * @param type
- * @param source
- **/
- function NOF_WindowEvent( type, source ){
- this.__proto__ = NOF_WindowEvent.prototype;
-
- this.SUPER(type, source);
- }
- NOF_WindowEvent.inherits(NOF_EventObject);
- NOF.__proto__.WindowEvent = NOF_WindowEvent;
-
- NOF.addVariable("WindowEvent.ITEM_SELECTED", "WINDOW_CLOSED");
- NOF.addVariable("WindowEvent.WINDOW_INITIALISED", "WINDOW_INITIALISED");
- NOF.addVariable("WindowEvent.DIALOG_OK", "DialogOk");
- NOF.addVariable("WindowEvent.DIALOG_CANCEL", "DialogCancel");
- NOF.addVariable("WindowEvent.DIALOG_CLOSED", "DIALOG_CLOSED");
- NOF.addVariable("WindowEvent.DATAUPDATE_TO_CTRL", "DATAUPDATE_TO");
- NOF.addVariable("WindowEvent.DATAUPDATE_FROM_CTRL", "DATAUPDATE_FROM");
-
- }
-
-